{extend name="../../admin/view/main"}

{block name='content'}
<form action="{:sysuri()}" class="layui-card layui-form" data-auto="true" method="post">
    <div class="layui-card-body">
        <label class="layui-col-xs6">
            <span class="help-label"><b>场次名称</b>News Title</span>
            <input class="layui-input" name="title" placeholder="请输入场次名称" required value='{$vo.title|default=""}'>
        </label>

        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>封面</b></span>
            <div class="relative block label-required-null">
                <input class="layui-input think-bg-gray" name="img" placeholder="请上传封面图片" readonly required value='{$vo.img|default=""}'>
                <a class="layui-icon layui-icon-upload input-right-icon" data-file data-field="img" data-type="gif,png,jpg,jpeg"></a>
            </div>
        </div>

        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>视频</b></span>
            <div class="relative block label-required-null">
                <input class="layui-input think-bg-gray" name="video" placeholder="请上传视频" readonly required value='{$vo.video|default=""}'>
                <a class="layui-icon layui-icon-upload input-right-icon" data-file data-field="video" data-type="mp4"></a>
            </div>
        </div>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>日期</b></span>
            <input class="layui-input" data-date-range name="time" placeholder="请选择日期" value="{$vo.time|default=''}">
        </label>
        <br>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存数据</button>
            <button class="layui-btn layui-btn-danger" data-history-back data-confirm="确定要取消编辑吗？" type='button'>取消编辑</button>
        </div>
    </div>

</form>

<script>
    $('input[name="img"]').uploadOneImage();
    $('input[name="video"]').uploadOneVideo();
</script>
{/block}
